import java.awt.Graphics;
import java.awt.Image;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JPanel;


public class test extends JFrame{
	private ImageIcon ii;
	private Image img;
	
	public void createForm(){
		this.ii = new ImageIcon("swik-logo-square.png");
		this.img = ii.getImage();
		this.setSize(500,400);
		this.setVisible(true);
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	}
	
	@Override
	public void paint(Graphics g) {
		super.paint(g);
		g.drawImage(img, 40, 0, this);
	}
	
	public static void main(String[] args) {
		test t = new test();
		t.createForm();
	}

}
